/**
 * Created by sunxin on 2017/4/13.
 */
var testClass=require("./test");
var test=new testClass();
var interface=[
    {
        "method":"POST",
        "path":"/test/test",
        "param": {
            id:{
                type:String,
                optional:1
            },
            name:{
                type:String,
                optional:1
            },
            group:{
                type:String,
                optional:1
            },
            remark:{
                type:String,
                optional:1
            },
            status:{
                type:Number,
                optional:1
            },
            code:{
                type:String,
                optional:1
            },
            output:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.save]
    },
    {
        "method":"GET",
        "path":"/test/list",
        "param": {
            project:{
                type:String,
            },
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.list]
    },
    {
        "method":"POST",
        "path":"/test/module",
        "param": {
            project:{
                type:String,
                optional:1
            },
            name:{
                type:String
            },
            module:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.saveModule]
    },
    {
        "method":"POST",
        "path":"/test/group",
        "param": {
            module:{
                type:String,
                optional:1
            },
            name:{
                type:String
            },
            group:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.saveGroup]
    },
    {
        "method":"DELETE",
        "path":"/test/module",
        "param": {
            module:{
                type:String,
            },
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.removeModule]
    },
    {
        "method":"DELETE",
        "path":"/test/group",
        "param": {
            group:{
                type:String,
            },
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.removeGroup]
    },
    {
        "method":"DELETE",
        "path":"/test/test",
        "param": {
            id:{
                type:String,
            },
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.removeTest]
    },
    {
        "method":"GET",
        "path":"/test/info",
        "param": {
            id:{
                type:String,
            },
            project:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.testInfo]
    },
    {
        "method":"PUT",
        "path":"/test/status",
        "param": {
            id:{
                type:String,
            },
            status:{
                type:Number
            },
            output:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.setStatus]
    },
    {
        "method":"PUT",
        "path":"/test/output",
        "param": {
            id:{
                type:String,
            },
            output:{
                type:String,
                optional:1
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.setOutput]
    },
    {
        "method":"PUT",
        "path":"/test/move",
        "param": {
            id:{
                type:String,
            },
            group:{
                type:String,
            }
        },
        "data":String,
        user:1,
        handle:[test.validateUser,test.moveTest]
    },
];

module.exports=interface;